<HTML>

<HEAD>
<!-- Generated by CppDoc v2.4.1 on June 07, 2008 at 22:48-->

	<META NAME="GENERATOR" Content="CppDoc">
	<TITLE>Nestopia Core API: Nes::Api::User::File</TITLE>

</HEAD>

<BODY>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..User..File.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
api</FONT>
<BR>
Struct  Nes::Api::User::File</H2>
<HR>
<DL>
<DT>struct <B><a href="../api/Nes..Api..User.html">Nes::Api::User</a>::File</B></DT></DL>

<p>File IO interface.
<p>

<HR>


<!-- =========== INNER CLASSES, TYPEDEFS, ENUMS =========== -->

<A NAME="inner_defs_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Classes, Typedefs, and Enums</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..User..File..Action.html">Nes::Api::User::File::Action</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Action event.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>enum</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..User..File..Patch.html">Nes::Api::User::File::Patch</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Supported patch formats.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual <a href="../api/Nes..Api..User..File..Action.html">Nes::Api::User::File::Action</a></CODE></FONT></TD>
<TD><CODE><B><a href="#GetAction()">GetAction</a></B>() const = 0</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns type of action.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#GetContent(constvoid*&,ulong&)">GetContent</a></B>( const void*& mem, ulong& size ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a pointer to the content to be saved and its size.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#GetContent(std::ostream&)">GetContent</a></B>( std::ostream& stream ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the content into an output stream.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual uint</CODE></FONT></TD>
<TD><CODE><B><a href="#GetId()">GetId</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the sound file ID to load.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual ulong</CODE></FONT></TD>
<TD><CODE><B><a href="#GetMaxSize()">GetMaxSize</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the maximum allowed size for the content to load.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual const wchar_t*</CODE></FONT></TD>
<TD><CODE><B><a href="#GetName()">GetName</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of the file to load.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#GetPatchContent(Patch,std::ostream&)">GetPatchContent</a></B>( <a href="../api/Nes..Api..User..File..Patch.html">Nes::Api::User::File::Patch</a> patch, std::ostream& stream ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Saves the patch content into an output stream.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetContent(constvoid*,ulong)">SetContent</a></B>( const void* mem, ulong size )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads content into the core.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetContent(std::istream&)">SetContent</a></B>( std::istream& stream )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads content into the core through stream.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetPatchContent(std::istream&)">SetPatchContent</a></B>( std::istream& stream )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads patch content into the core.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;virtual Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetSampleContent(constvoid*,ulong,bool,uint,ulong)">SetSampleContent</a></B>( const void* mem, ulong length, bool stereo, uint bits, ulong rate )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Loads audio content into the core.</TD>
</TR>
</TABLE>
&nbsp;

<BR>
<BR>
<!-- ============ Method Detail ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="GetAction()"><!-- --></A>
<A NAME="GetAction"><!-- --></A>
<H3>GetAction</H3>
<PRE>
public virtual <a href="../api/Nes..Api..User..File..Action.html">Nes::Api::User::File::Action</a> <B>GetAction</B>() const throw()= 0;
</PRE>
<DL>
<DD>Returns type of action.
</DD>
<DL>
<DT><B>Returns: </B><DD>action</DD>
</DL>

</DL>
<HR>

<A NAME="GetContent(constvoid*&,ulong&)"><!-- --></A>
<A NAME="GetContent"><!-- --></A>
<H3>GetContent</H3>
<PRE>
public virtual Result <B>GetContent</B>( const void*& mem, ulong& size ) const throw();
</PRE>
<DL>
<DD>Returns a pointer to the content to be saved and its size.
Used only with the SAVE_xx action callbacks.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>mem</code> - pointer to content
<DD><code>size</code> - size of content
<DD><code>result</code> - code</DD>
</DL>

</DL>
<HR>

<A NAME="GetContent(std::ostream&)"><!-- --></A>
<A NAME="GetContent"><!-- --></A>
<H3>GetContent</H3>
<PRE>
public virtual Result <B>GetContent</B>( std::ostream& stream ) const throw();
</PRE>
<DL>
<DD>Saves the content into an output stream.
Used only with the SAVE_xx action callbacks.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - output stream
<DD><code>result</code> - code</DD>
</DL>

</DL>
<HR>

<A NAME="GetId()"><!-- --></A>
<A NAME="GetId"><!-- --></A>
<H3>GetId</H3>
<PRE>
public virtual uint <B>GetId</B>() const throw();
</PRE>
<DL>
<DD>Returns the sound file ID to load.
Used only with the LOAD_SAMPLE_xx action callbacks.
</DD>
<DL>
<DT><B>Returns: </B><DD>sample id</DD>
</DL>

</DL>
<HR>

<A NAME="GetMaxSize()"><!-- --></A>
<A NAME="GetMaxSize"><!-- --></A>
<H3>GetMaxSize</H3>
<PRE>
public virtual ulong <B>GetMaxSize</B>() const throw();
</PRE>
<DL>
<DD>Returns the maximum allowed size for the content to load.
Used only with the LOAD_xx action callbacks.
</DD>
<DL>
<DT><B>Returns: </B><DD>max size</DD>
</DL>

</DL>
<HR>

<A NAME="GetName()"><!-- --></A>
<A NAME="GetName"><!-- --></A>
<H3>GetName</H3>
<PRE>
public virtual const wchar_t* <B>GetName</B>() const throw();
</PRE>
<DL>
<DD>Returns the name of the file to load.
Used only with the LOAD_ROM and LOAD_SAMPLE action callbacks.
</DD>
<DL>
<DT><B>Returns: </B><DD>filename</DD>
</DL>

</DL>
<HR>

<A NAME="GetPatchContent(Patch,std::ostream&)"><!-- --></A>
<A NAME="GetPatchContent"><!-- --></A>
<H3>GetPatchContent</H3>
<PRE>
public virtual Result <B>GetPatchContent</B>( <a href="../api/Nes..Api..User..File..Patch.html">Nes::Api::User::File::Patch</a> patch, std::ostream& stream ) const throw();
</PRE>
<DL>
<DD>Saves the patch content into an output stream.
Used only with the FDS_SAVE action callback.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>patch</code> - patch format to use
<DD><code>stream</code> - output stream</DD>
</DL>

</DL>
<HR>

<A NAME="SetContent(constvoid*,ulong)"><!-- --></A>
<A NAME="SetContent"><!-- --></A>
<H3>SetContent</H3>
<PRE>
public virtual Result <B>SetContent</B>( const void* mem, ulong size ) throw();
</PRE>
<DL>
<DD>Loads content into the core.
Used only with the LOAD_xx action callbacks.
This method can't be used for audio or patch content. Instead, use LoadSampleContent(..)
and SetPatchContent(..) for those.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>mem</code> - content
<DD><code>size</code> - size of content</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="SetContent(std::istream&)"><!-- --></A>
<A NAME="SetContent"><!-- --></A>
<H3>SetContent</H3>
<PRE>
public virtual Result <B>SetContent</B>( std::istream& stream ) throw();
</PRE>
<DL>
<DD>Loads content into the core through stream.
Used only with the LOAD_xx action callbacks.
This method can't be used for audio or patch content. Instead, use LoadSampleContent(..)
and SetPatchContent(..) for those.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="SetPatchContent(std::istream&)"><!-- --></A>
<A NAME="SetPatchContent"><!-- --></A>
<H3>SetPatchContent</H3>
<PRE>
public virtual Result <B>SetPatchContent</B>( std::istream& stream ) throw();
</PRE>
<DL>
<DD>Loads patch content into the core.
Used only with LOAD_FDS action callback.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>stream</code> - input stream to patch</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="SetSampleContent(constvoid*,ulong,bool,uint,ulong)"><!-- --></A>
<A NAME="SetSampleContent"><!-- --></A>
<H3>SetSampleContent</H3>
<PRE>
public virtual Result <B>SetSampleContent</B>( const void* mem, ulong length, bool stereo, uint bits, ulong rate ) throw();
</PRE>
<DL>
<DD>Loads audio content into the core.
Used only with the LOAD_SAMPLE and LOAD_SAMPLE_xx action callbacks.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>mem</code> - sample content
<DD><code>length</code> - number of samples
<DD><code>stereo</code> - dual channel if true
<DD><code>bits</code> - bits per sample
<DD><code>rate</code> - sample rate</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..User..File.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>


</BODY>

</HTML>

